package com.sodaopen.study.service;

import java.util.List;
import java.util.Map;

import com.sodaopen.study.entity.Chapter;

public interface ChapterService {

	List<Chapter> findLevelChapterByCourseId(Integer id);

	Chapter findById(Integer id);

	Chapter findCurrentChapter(List<Chapter> chapterList);

    void finishChapter(Integer userId, Integer chapterId);

	Chapter findByIdFinish(Integer id, Integer userId);

	List<Chapter> findLevelChapterByCourseIdFinish(Integer courseId, Integer userId);

	Map findLockedByPrimaryKey(Integer userId, Integer courseId);

	void lockUserChapter(Integer userId, Integer courseId, Integer chapterId);

    List<Chapter> findByCourseId(Integer courseId);

	Integer findMaxSort(Integer pid, Integer courseId);

	void saveChapter(Chapter chapter);
}
